<%@ page contentType="text/html; charset=utf-8" %>
<%@ include file="/WEB-INF/jsp/includeTaglib.jsp" %>
<table class="dbborder" width="100%" border="0" cellpadding="0" cellspacing="1">
	<tr class="rowHead">
		<td height="20" width="20" align="center"></td>
		<td height="20" nowrap align="center" class="globalTextBold">姓名</td>
		<td height="20" nowrap align="center" class="globalTextBold">身份证号</td>
	</tr>
	<c:forEach var="salesLegacy" items="${page.data}" varStatus="status">
		<tr class="rowClass">
			<td height="20" width="20" align="center">
				<input type="checkbox" id="${salesLegacy.code}" value="${salesLegacy.code}" />
			</td>
			<td height="20" class="globalText">${salesLegacy.name}</td>
			<td height="20" class="globalText">${salesLegacy.idCardNo}</td>
		</tr>
	</c:forEach>
	<tr>
		<td colspan="3" >
			<input type="button" class="btnStyle" value="选择" 
				   onclick="javascript:chooseSalesPromoter();" 
			/>
		</td>
	</tr>
</table>




<script>
	function chooseSalesPromoter(){
		var rtnVal=new Array();
		$("input:checked").each(function(){
			rtnVal.push(this.value);
		});
		
		
		var pWindow=window.dialogArguments;
		if(pWindow){
	    	if(typeof(pWindow.chooseSalesPromoterCallBack)=='function'){
	    		pWindow.chooseSalesPromoterCallBack(rtnVal);
	    		window.close();
	    	}
	    }
	}
    
</script>

<script>
<c:forEach var="psp" items="${projSalesProm}" varStatus="status">
	$("#${psp.salesPromoter.code}").attr("checked",true);
</c:forEach>
</script>

<%@ include file="/WEB-INF/jsp/includePagination.jsp"%>

